package com.zmm.zebulon.module.trade.biz.dal.mysql.order;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zmm.zebulon.module.trade.biz.dal.dataobject.order.TradeOrderLogDO;
import com.zmm.zebulon.starter.mybatis.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * description: TODO
 *
 * @author zebulon
 * package com.zmm.zebulon.module.trade.biz.dal.mysql.order
 * name: TradeOrderLogMapper
 * date 2025/9/4 14:39
 */
@Mapper
public interface TradeOrderLogMapper extends BaseMapperX<TradeOrderLogDO> {

    default List<TradeOrderLogDO> selectListByOrderId(Long orderId) {
        return selectList(new LambdaQueryWrapper<TradeOrderLogDO>()
                .eq(TradeOrderLogDO::getOrderId, orderId)
                .orderByDesc(TradeOrderLogDO::getCreateTime));
    }

}
